<html><head>
        <link href="<?php echo base_url('assets/css/formkk.css'); ?>" rel="stylesheet" type="text/css">
        <title>Laporan Data KK</title>
    </head>
    <body>
        <table width="100%" border="0" align="center">
            <tr>
                <td colspan="10" class="trheader">Laporan Data Kartu Keluarga</td>
            </tr>

            <tr>
                <td colspan="10" bordercolor="#666666" class="trheader">Kategori : Per Dusun</td>
            </tr>

            <tr>
                <td colspan="10" bordercolor="#666666" class="tr">&nbsp;</td>
            </tr>
            <form action="<?php echo base_url('kk/cari_dusun'); ?>" method="post" enctype="multipart/form-data">
            <tr>
                <td colspan="10" bordercolor="#666666" class="cari">Cari Dusun: 
                    
                        <input type="text" name="dusun" id="dusun" class="textinput" placeholder="Dusun" />
                        <input type="submit" name="cari" id="cari" value="Cari" class="btn btn-large"/>
                    
                </td>
            </tr>
            </form>
            <tr>
                <td colspan="10">&nbsp;</td>
            </tr>
            <td colspan="10" bordercolor="#666666" class="tampilcari"><div align="center">Data KK yang berada di Dusun: <?php echo isset($dusun_kk) ? $dusun_kk : ''; ?></div></td>
            <tr>
                <td colspan="10" class="jeda">&nbsp;</td>
            </tr>
            <tr>
                <td width="3%" bordercolor="#666666"><div align="center"><strong>No</strong></div></td>
                <td width="16%" bordercolor="#666666"><div align="center"><strong>Nomor KK</strong></div></td>
                <td width="15%" bordercolor="#666666"><div align="center"><strong>NIK Kepala Keluarga</strong></div></td>
                <td width="18%" bordercolor="#666666"><div align="center"><strong>Nama Kepala Keluarga</strong></div></td>
                <td width="22%" bordercolor="#666666"><div align="center"><strong>Alamat</strong></div></td>
                <td width="10%" bordercolor="#666666"><div align="center"><strong>Tgl. Pembuatan</strong></div></td>
            </tr>

            <?php
            if (isset($kk)) {
                $no = 1;
                foreach ($kk->result() as $data_kk) {
                    echo '<tr>';
                    echo '<td><div align="center">' . $no++ . '</div></td>';
                    echo '<td><div align="center">' . $data_kk->no_kk . '</div></td>';
                    echo '<td><div align="center">' . $data_kk->nik_kk . '</div></td>';
                    echo '<td>' . $data_kk->nama_kk . '</td>';
                    echo '<td>' . $data_kk->alamat . ' RT ' . $data_kk->rt . ', RW ' . $data_kk->rw . ', Dusun ' . $data_kk->dusun . '</td>';
                    echo '<td><div align="center">' . $this->tanggal->tanggal_indonesia($data_kk->tgl_pembuatan) . '</div></td>';

                    echo '</tr>';
                }
            }
            ?>
        </table>
        <br>
        <table width="419" border="0" align="center">
            <tr>
                <td colspan="2" class="jeda"><strong>Data Tercatat</strong></td>
            </tr>
            <tr>
                <td width="177">Jumlah Kepala Keluarga</td>
                <td width="232">: <?php echo $kk->num_rows(); ?> kepala keluarga</td>
            </tr>
        </table>
    </body>
</html>
